package cn.xej.health.user.feign;

import cn.xej.health.common.utils.CommonResult;
import cn.xej.health.common.utils.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.security.Principal;
import java.util.Map;

/**
 * @author xej
 */
@FeignClient("health-auth")
public interface AuthFeignService {
    /**
     * 获取token
     * @param parameters
     * @return
     */
    @PostMapping("/oauth/token")
    CommonResult postAccessToken(@RequestParam Map<String, String> parameters);

    /**
     * first
     * @return
     */
    @PostMapping("/oauth/first")
    String getFirst(@RequestParam Map<String, String> parameters);
}
